package xgame.login.cmd;

import xgame.AbstractXcommand;
import xgame.XpropertyContainer;

/**
 * 登录命令
 * 
 * @author AfritXia
 * @version $Rev: 0 $
 *
 */
public class LoginCmd extends AbstractXcommand {
	/**
	 * 用户名称
	 * 
	 */
	private String _userName = null;

	/**
	 * 用户密码
	 * 
	 */
	private String _userPass = null;

	@Override
	public int getId() {
		return CmdIdConsts.LOGIN_CMD;
	}

	/**
	 * 获取用户名称
	 * 
	 * @return 
	 * 
	 */
	public String getUserName() {
		return this._userName;
	}

	/**
	 * 设置用户名称
	 * 
	 * @param value 
	 * 
	 */
	public void setUserName(String value) {
		this._userName = value;
	}

	/**
	 * 获取用户密码
	 * 
	 * @return 
	 * 
	 */
	public String getUserPass() {
		return this._userPass;
	}

	/**
	 * 设置用户密码
	 * 
	 * @param value 
	 * 
	 */
	public void setUserPass(String value) {
		this._userPass = value;
	}

	@Override
	public void deserialize(XpropertyContainer c) {
		if (c == null) {
			return;
		}

		this.setUserName(c.getString("userName"));
		this.setUserPass(c.getString("userPass"));
	}

	@Override
	public XpropertyContainer serialize() {
		return null;
	}
}
